﻿<UserControl x:Class="Qplus.UI.SearchControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="718" d:DesignWidth="480"
             xmlns:my="clr-namespace:Qplus">

    <Grid x:Name="LayoutRoot" Height="718" Background="#EB00E3FF">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>
            <Image Grid.Row="0" Source="/Qplus;component/Pic/user_info_edit_bg.png" Stretch="Fill" />
            <TextBox Name="nickName" Text="{Binding userName, Mode=TwoWay}" TextAlignment="Center"  Grid.Row="0" TextChanged="nickName_TextChanged" />
        <TextBlock Grid.Row="1" TextWrapping="Wrap" TextAlignment="Center"
                       Text="根据昵称关键字列出昵称中含有关键字的所有用户"/>
        <StackPanel Grid.Row="2" Orientation="Horizontal">
            <RadioButton Name="age00" Content="不限" GroupName="age" Checked="RadioButton_Checked"/>
            <RadioButton Name="age16" Content="16-22" GroupName="age" Checked="RadioButton_Checked"/>
            <RadioButton Name="age23" Content="23-30" GroupName="age" Checked="RadioButton_Checked"/>
            <RadioButton Name="age31" Content="31-40" GroupName="age" Checked="RadioButton_Checked"/>
            <RadioButton Name="age40" Content="40-100" GroupName="age" Checked="RadioButton_Checked"/>
        </StackPanel>
        <my:ButtonEx Visibility="Collapsed" Content="年龄不限" Width="480" Height="60" BorderThickness="0" InvisibleMargin="0" Grid.Row="2">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/user_info_age.png" />
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/user_info_age_down.png"/>
                </my:ButtonEx.PressedBackground>
            </my:ButtonEx>
        <TextBlock TextWrapping="Wrap" TextAlignment="Center" Text="设定年龄段，将搜索出该年龄段的所有用户" Grid.Row="3"/>
            <Grid Width="480" Grid.Row="4">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <RadioButton Name="maleRbtn" Grid.Column="0" GroupName="sex" Visibility="Collapsed" Checked="maleRbtn_Checked" Unchecked="maleRbtn_Unchecked" />
                <Image Name="maleImgUnSelect" Grid.Column="0" Source="/Qplus;component/Pic/btn_search_male.png" Stretch="None" />
                <Image Name="maleImgSelect" Grid.Column="0" Source="/Qplus;component/Pic/btn_search_male_pressed.png" Stretch="None" Visibility="Collapsed" />
                <TextBlock Name="maleTxtBlk" Text="男" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" />
                <my:ButtonEx x:Name="maleBtn" Grid.Column="0" Grid.RowSpan="2" Background="Transparent" PressedBackground="Transparent" BorderThickness="0" Click="maleBtn_Click"/>
                <RadioButton Name="femaleRbtn" Grid.Column="1" GroupName="sex" Visibility="Collapsed" Checked="femaleRbtn_Checked" Unchecked="femaleRbtn_Unchecked" />
                <Image Name="femaleImgUnSelect" Grid.Column="1" Source="/Qplus;component/Pic/btn_search_female.png" Stretch="None" />
                <Image Name="femaleImgSelect" Grid.Column="1" Source="/Qplus;component/Pic/btn_search_female_pressed.png" Stretch="None" Visibility="Collapsed" />
                <TextBlock Name="femaleTxtBlk" Text="女" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" />
                <my:ButtonEx x:Name="femaleBtn" Grid.Column="1" Grid.RowSpan="2" Background="Transparent" PressedBackground="Transparent" BorderThickness="0" Click="femaleBtn_Click"/>
                <RadioButton Name="unknowRbtn" Grid.Column="2" GroupName="sex" Visibility="Collapsed" Checked="unknowRbtn_Checked" Unchecked="unknowRbtn_Unchecked" />
                <Image Name="unknowImgUnSelect" Grid.Column="2" Source="/Qplus;component/Pic/btn_search_unknow.png" Stretch="None" />
                <Image Name="unknowImgSelect" Grid.Column="2" Source="/Qplus;component/Pic/btn_search_unknow_pressed.png" Stretch="None" Visibility="Collapsed" />
                <TextBlock Name="unknowTxtBlk" Text="你猜" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center" />
                <my:ButtonEx x:Name="unknowBtn" Grid.Column="2" Grid.RowSpan="2" Background="Transparent" PressedBackground="Transparent" BorderThickness="0" Click="unknowBtn_Click"/>
            </Grid>
            <TextBlock Text="设定性别" TextAlignment="Center" Grid.Row="5"/>
            <my:ButtonEx x:Name="checkBtnEx" Content="确定" Width="155" Height="49" Grid.Row="6" BorderThickness="0" InvisibleMargin="0" Click="ButtonEx_Click">
                <my:ButtonEx.Background>
                    <ImageBrush ImageSource="/Qplus;component/Pic/btn_search_ok.png" Stretch="None"/>
                </my:ButtonEx.Background>
                <my:ButtonEx.PressedBackground>
                    <ImageBrush ImageSource="/Qplus;component/Pic/btn_search_ok_pressed.png" Stretch="None"/>
                </my:ButtonEx.PressedBackground>
        </my:ButtonEx>
    </Grid>
</UserControl>
